package com.zry.study.ui.base;


import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.zry.study.animation.RecyclerViewUtilKt;
import com.zry.study.utils.ToastUtil;

import java.util.Objects;




/**
 * Created by Administrator on 2017/5/17 0017.
 */

public abstract class BaseFragment extends Fragment {

    public RecyclerViewUtilKt recyclerViewUtilKt;


    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setOnCreate();
    }


    protected void toast(String toastMessage) {
       ToastUtil.Companion.toast(Objects.requireNonNull(getActivity()), toastMessage);
    }

    protected abstract void setOnCreate();


    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View view = initView();


        return view;
    }


    public abstract View initView();


}
